ul.nav.nav-tabs
	mixin li(name)
		li(
			v-bind:class=`{active: page === '${name}'}`
			@click=`page = '${name}'`
			v-if=`!disableTabs.includes('${name}') && schema.data['${name}'].length`
		)
			a #{name}
	+li("Basic")
	+li("HTTP/FTP/SFTP")
	+li("HTTP")
	+li("FTP/SFTP")
	+li("BitTorrent/Metalink")
	+li("BitTorrent")
	+li("Metalink")
	+li("RPC")
	+li("Advanced")
hr(style=`
	margin-top: 10px;
`)
div.form-horizontal(style=`
	max-height: 100vh;
	overflow-x: hidden;
	overflow-y: auto;
`)
	.form-group(
		v-for="option in schema.data[page]"
	)
		label.col-sm-2.control-label {{option.name}}
		.col-sm-10(style="width:50%;")

			template(
				v-if=`option.type === 'string'`
			)
				input.form-control(
					type="text"
					v-model="option.value" lazy
					@focus=`focusForm = option.name`
				)
				template(
					v-if=`
						focusForm === option.name
							&& option.suggest.items.length
					`
				)
					p.small
					ul.list-group
						li.list-group-item.small(
							v-for=`item in option.suggest.items`
							@click=`option.value = item.value`
						)
							| {{item.value}}
							i.fa.fa-remove.fa-fw.pull-right(
								@click='item.remove()'
							)


			template(
				v-if=`option.type === 'bool'`
			)
				label.control-label
					input(
						type="checkbox"
						v-model="option.value" lazy
						@focus=`focusForm = option.name`
					)


			template(
				v-if=`option.type == 'number'`
			)
				number-input(
					:option.sync="option"
				)


			template(
				v-if=`option.type == 'radio'`
			)


				label.checkbox-inline(v-for="item in option.options")
					input(
						type='radio'
						:value='item'
						v-model="option.value"
					)
					| &nbsp;&nbsp;{{ item }}


			p.help-block {{option.text}}
hr
button.btn.btn-primary.pull-right(@click="submit()") 保存